Tutorial on Subtype Marks

نویسنده

  • Tamás Kozsik
چکیده

When developing safety critical applications, the programmer might want to be able to prove his or her code correct. The integration of a proof system and a programming language of industrial strength can be fairly useful in this respect, like in the case of, for instance, the B method [1] or the functional programming languages Erlang [12,5] and Clean [6,4]. This paper presents the concept of subtype marks, a concept that establishes still closer links between a programming language and a proof system by letting the programmer encode certain important properties of programs within the type system of the language. Subtype marks are introduced here as part of a simple functional language. This language can be regarded as a small subset of Clean. In programming languages types play an important role with respect to safety: they can help avoid ill-behaved programs by forcing compilation-time errors (or, in case of dynamic typing, run-time type errors) for programs that use variables and operations inconsistently or possibly incorrectly. Type systems can provide a high degree of safety at low operational costs. As part of the compiler (and, in case of dynamic typing, the run-time system), they discover many semantic errors very efficiently. There are many ways to make type systems even more powerful than usual. Among the most interesting ones is the concept of “dependent types”: types that depend on values. Dependent types are, in principle, used in proof systems. However, they also appear in some programming languages, for example in Cayenne [2] and Epigram [10]. In dependently typed languages types are first class citizens, and sophisticated computations can be expressed on them. These computations are executed at compile time, during the type checking of programs. Dependent types provide significantly more information about the meaning of a program than types in traditional type systems do, hence type checking becomes more like theorem proving in dependently typed languages. Another interesting approach to increase the expressiveness of type systems is to add annotations to types. The functional programming language Clean implements the “uniqueness type system” (a type system that makes destructive updates of memory and input-output operations possible without violating referential transparency) with annotations. Furthermore, annotations are used in this language to change the default lazy evaluation strategy into strict. Annotations in a type system can also carry information about concurrency [7], complexity [14] etc. Ownership types [3], for example, make it possible to reason about programs with respect to pointers and aliasing.

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Development and Usability Evaluation of an Online Tutorial for “How to Write a Proposal” for Medical Sciences Students

Background and Objective: Considering the importance of learning how to write a proposal for students, this study was performed to develop an online tutorial for “How to write a Proposal” for students and to evaluate its usability. Methods: This study is a developmental research and tool design. “Gamified Online Tutorial based on Self-Determination Theory (GOT-STD) Framework" became the basis f...

متن کامل

A tutorial on Quasi-experimental designs

A main step in answering a scientific hypothesis in an epidemiological study is deciding which type of study is suitable to be undertaken, considering methodology, practical considerations and budget and time limitations

متن کامل

Self- and peer assessment may not be an accurate measure of PBL tutorial process

BACKGROUND Universidade Cidade de São Paulo adopted a problem-based learning (PBL) strategy as the predominant method for teaching and learning medicine. Self-, peer- and tutor marks of the educational process are taken into account as part of the final grade, which also includes assessment of content. This study compared the different perspectives (and grades) of evaluators during tutorials wi...

متن کامل

Lecture and Tutorial Attendance and Student Performance in the First Year Economics Course: A Quantile Regression Approach

Using Ordinary Least Square and Quantile regression, this study found a significant positive relationship between lecture and tutorial attendance and marks in a first year quantitative unit-Introduction to Economic Methods (IEM). The results reveal that students who had studied higher level HSC mathematics (with calculus) were better equipped to undertake IEM. In contrast, students who only stu...

متن کامل

Assign predicates to subtype marks — a case study ∗

A type system with subtype marks enables us to reason about certain safety properties of programs in an efficient way. A significant part of the reasoning can be performed by the type system, only the remaining part has to be performed with a more resource consuming tool. This latter can be either a theorem prover, or a run-time system. The paper investigates both approaches. It summarizes what...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2005